
/**
 * AppleIIGo
 * Disk Port class
 * (C) 2008 by Marc S. Ressl (mressl@umich.edu)
 * Released under the GPL
 */

#ifndef DISKPORT_H
#define DISKPORT_H

#include "DiskDrive.h"

#define PHASE0	 (1 << 0)
#define PHASE1	 (1 << 1)
#define PHASE2	 (1 << 2)
#define PHASE3	 (1 << 3)

class DiskPort : public DiskDrive {
public:
	DiskPort();
	
	virtual void reset();
	
	virtual void setControl(bool value);
	virtual void setPhaseRegister(UINT32 value);
	virtual void onPhysicalPhaseUpdate();
	virtual void setDriveEnabled(bool value);
	
	virtual bool senseInput();
	
	virtual void updateSendBitNum(UINT32 * value);
	virtual void sendBit(bool value);
	virtual void updateReceiveBitNum(UINT32 * value);
	virtual bool receiveBit();
	virtual void discardBits(UINT32 bitNum);
};

#endif
